<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.Statement" %>
<%@ page import="java.sql.ResultSet" %>
<%@ page import="java.sql.DriverManager" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>删除用户操作</title>
</head>
<body>
<p>删除成功</p>
<%
String id = request.getParameter("id");
String username= request.getParameter("username");
String password = request.getParameter("password");

    Connection connection = null;
    Statement statement  =null;
    ResultSet resultSet = null;

   // String sql ="delect * from t_user"
          //  +"where id ="+id;
    String sql = "DELETE FROM  t_users WHERE  id = " + id;//sql代码是怎样的操作。

    Class.forName("com.mysql.jdbc.Driver");

    connection= DriverManager.getConnection(
            "jdbc:mysql://localhost:3306/sctu_javaweb_2018?serverTimezone=UTC",
            "root",
            "123456"
    );
statement= connection.createStatement();
    statement.execute(sql);

    connection.close();
    statement.close();
%>
</body>
</html>
